﻿using System;
using System.Linq;
using System.Net.NetworkInformation;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace WorkFlow.Desinger.Code.UnitTests
{
    [TestClass]
    public class T_ProcessInWf
    {
        [TestMethod]
        public void ParseInputExpress()
        {
           var list= ProcessInWf.ParseInputExpress("__2_1++-");
            if (list == null) throw new Exception();
            var v = list.Aggregate("", (current, s) => current + s);
            if(!v.Equals("02-1")) throw new Exception();
        }

        [TestMethod]
        public void GetMiddleStr()
        {
            var str = ProcessInWf.GetMiddleStr("wfact_2{x<=2}", '{', '}');
            if(!str.Equals("x<=2")) throw new Exception();

        }
    }
}